package routers

import (
	"shop/internal/handler"

	"github.com/gin-gonic/gin"
)

func init() {
	apiV1RouterFns = append(apiV1RouterFns, func(group *gin.RouterGroup) {
		tkOrderAfterSaleRouter(group, handler.NewTkOrderAfterSaleHandler())
	})
}

func tkOrderAfterSaleRouter(group *gin.RouterGroup, h handler.TkOrderAfterSaleHandler) {
	group.POST("/tkOrderAfterSale", h.Create)
	group.DELETE("/tkOrderAfterSale/:id", h.DeleteByID)
	group.POST("/tkOrderAfterSale/delete/ids", h.DeleteByIDs)
	group.PUT("/tkOrderAfterSale/:id", h.UpdateByID)
	group.GET("/tkOrderAfterSale/:id", h.GetByID)
	group.POST("/tkOrderAfterSale/list/ids", h.ListByIDs)
	group.POST("/tkOrderAfterSale/list", h.List)
}
